package com.example.hospital.patientinformation.controller;

import com.example.hospital.patientinformation.pojo.Patienti;
import com.example.hospital.patientinformation.repository.PatientinRepository;
import com.example.hospital.patientinformation.service.PatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@Controller
public class LoginController {

    @Autowired
    private PatientinRepository patientinRepository;


    @Autowired
    private PatientService patientService;

    @GetMapping("/loginl")
    public String login(String name, String pwd, Map map){

        map.put("name",name);
        return "main01";
    }

    @GetMapping("/indexl")
    public String index(){
        return "index";
    }
}
